package characters;

public class Ball {
    double posX;
    double posY;
    double vecX;
    double vecY;

    public Ball(String origin) {
        String [] tmp = origin.replaceAll("\\(|\\)", "").split("\\s+");
        this.posX = Double.parseDouble(tmp[1]);
        this.posY = Double.parseDouble(tmp[2]);
        this.vecX = Double.parseDouble(tmp[3]);
        this.vecY = Double.parseDouble(tmp[4]);
    }

    public double getPosX() {
        return posX;
    }

    public void setPosX(double posX) {
        this.posX = posX;
    }

    public double getPosY() {
        return posY;
    }

    public void setPosY(double posY) {
        this.posY = posY;
    }

    public double getVecX() {
        return vecX;
    }

    public void setVecX(double vecX) {
        this.vecX = vecX;
    }

    public double getVecY() {
        return vecY;
    }

    public void setVecY(double vecY) {
        this.vecY = vecY;
    }
}
